package com.ts.feign.user;

import com.ts.feign.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@Component
@FeignClient(name = "ts-content",path = "/user",contextId = "user")
public interface UserFeign {

    @GetMapping("getUserByMobile")
    public UserDTO getUserByMobile(@RequestParam("mobile") String mobile);

    @PostMapping("save")
    public UserDTO save(@RequestBody UserDTO userEntity);


    /**
     * 修改用户头像
     * @param
     */
    @PostMapping("currentUserInfo")
    public boolean currentUserInfo(@RequestBody UserDTO userDTO);

    /**
     * 修改用户名/性别/生日/个性签名/标签
     * @param userDTO
     * @return
     */
    @PostMapping("userInfoEdit")
    public boolean userInfoEdit(@RequestBody UserDTO userDTO);

}
